﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NTQOnlineExam.Services.EntityFW.Entity
{
    public class UserProfile
    {
        public int UserId { get; set; }
        public string UserName { get; set; }
        public string FirstName { get; set; }
        public string LastName { get; set; }
        public string Email { get; set; }
        public string Phone { get; set; }
        public string BillingAddress { get; set; }
        public string BillingPOBox { get; set; }
        public string BillingZipCode { get; set; }
        public string BillingCity { get; set; }
        public string BillingCountry { get; set; }
        public bool IsDeleted { get; set; }
        public string TemporaryNewPasswordToken { get; set; }

    }

    public class UserProfileMap : EntityTypeConfiguration<UserProfile>
    {
        public UserProfileMap()
        {
            this.HasKey(t => t.UserId);
            this.Property(t => t.UserId).HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);
            this.ToTable("UserProfile");
        }
    }
}
